public class 计算图形面积3 {
    public static void  main(String[] args){
        System.out.println(triangle(9,8));
        System.out.println(square(9));
        System.out.println(rectangle(4,5));
    }

    public  static double triangle(double a,double b){
        return  a*b*0.5;
    }
    public static double square(double a){
        return Math.pow(a,2);
    }
    public  static double rectangle(double a,double b){
        return a*b;
    }
}
